package com.fsh.subject.application.controller;

import com.fsh.subject.infra.rpc.UserRpc;
import com.fsh.subject.infra.rpc.entity.UserInfo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/subject")
public class FeignController {
    @Resource
    private UserRpc userRpc;

    @GetMapping("/getUserInfo")
    public String getUserInfo(){
        UserInfo userInfo = userRpc.getUserInfo("ox1lI6pkOLMzKdrtdmyjLHFxqevA");
        return userInfo.getNickName();
    }

}
